package com.elitetyc.eliteim.client.handler.impl;

import com.elitetyc.eliteim.common.constant.Constants;
import com.elitetyc.eliteim.common.handler.impl.BaseMsgHandler;
import com.elitetyc.eliteim.common.model.DefaultMsg;
import com.elitetyc.eliteim.common.proto.RequestProto;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author yuanchao.tan
 * @version 1.0
 * @description 登陆消息处理器
 * @Date 2021/9/16 13:37
 */
@Component
@Slf4j
public class PongMsgHandlerImpl extends BaseMsgHandler<DefaultMsg> {



    @Override
    public boolean support(int type) {
        return Constants.RequestType.PING==type;
    }

    @Override
    public void handleMsg(ChannelHandlerContext ctx, RequestProto.RequestProtocol source, DefaultMsg msg) {
        // 接收到服务端pong消息

        log.info("receive server pong msg");

    }


}

